﻿@namespace MduiBlazor
@inherits MduiComponentBase

@if (SnackbarList.Any())
{
    <CascadingValue Value="@this" IsFixed>
        @foreach (var instance in SnackbarList.OrderBy(x => x.TimeStamp))
        {
            <MduiSnackbar @key="instance" Options="@(instance.Options??Options)" Color="@instance.Color" SnackbarId="@instance.Id">
                @instance.MessageContent
            </MduiSnackbar>
        }
    </CascadingValue>
}